#include "player.h"
#include "queue.h"
#include "queue_cursor.h"
#include "queue_source.h"
#include "audio_sinks/ao_sink.h"
#include "interfaces/audio_sink_interface.h"
#include "network/network_interface.h"

int main(int argc, char** argv)
{
	using namespace pita;

	Queue queue;
	QueueCursor cursor(queue);
	QueueSource source(cursor);

	AOSink aoSink;
	std::vector<AudioSinkInterface*> sinks;
	sinks.push_back(&aoSink);

	Player player(source, sinks.begin(), sinks.end());
	
	queue.insert(SourceDescriptor(argv[1], Metadata()), 0);
	player.play();

	NetworkInterface netif(cursor, player);
	netif.run();

	// sleep(10);

	player.shutdown();

	return 0;
}
